#include <iostream>

using namespace std;

class base {
public:
        int a, b;
};

class m1 : virtual public base {
public:
        int c;
};

class m2 : virtual public base {
public:
        int c;
};

class ul : public m1, public m2 {
public:
        int d;
};

int main()
{
        ul xx;

        xx.a = 4;
        xx.m1::c = 6;
        xx.m2::c = 7;

        cout << xx.m1::c << ' ' << xx.m2::c << endl;

        return 0;
}
